package com.hubu.blog.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

import java.io.Serial;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 用户-VIP关联表 实体类。
 *
 * @author 331126135@qq.com
 * @since 2025-06-10
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "用户-VIP关联表")
@Table(value = "blog_user_vip", schema = "db_blog")
public class UserVip implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 记录ID，雪花算法生成
     */
    @Id
    @Schema(description = "记录ID，雪花算法生成")
    private Long id;

    /**
     * 用户ID
     */
    @Schema(description = "用户ID")
    private Long userId;

    /**
     * 套餐ID
     */
    @Schema(description = "套餐ID")
    private Long planId;

    /**
     * 关联订单ID
     */
    @Schema(description = "关联订单ID")
    private String orderId;

    /**
     * 开始时间
     */
    @Schema(description = "开始时间")
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @Schema(description = "结束时间")
    private LocalDateTime endTime;

    /**
     * 是否自动续费(1是 0否)
     */
    @Schema(description = "是否自动续费(1是 0否)")
    private Boolean isAutoRenew;

    /**
     * 状态
     */
    @Schema(description = "状态")
    private String status;

    /**
     * 是否删除：0-未删除 1-已删除
     */
    @Column(isLogicDelete = true)
    @Schema(description = "是否删除：0-未删除 1-已删除")
    private Boolean isDeleted;

    /**
     * 删除原因
     */
    @Schema(description = "删除原因")
    private String deleteReason;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    /**
     * 删除时间
     */
    @Schema(description = "删除时间")
    private LocalDateTime deleteTime;

}
